 /**
 * the object of the menu item. 
 * @author William
 * 2012-2-26
 */

package com.ytu.cloudbackup.face;

import android.graphics.drawable.Drawable;
import android.graphics.drawable.LevelListDrawable;

public class MenuItemData {

	private LevelListDrawable mLevelListDrawable;

	private String mTitleID[];

	private int mCount;

	public MenuItemData(LevelListDrawable levelListDrawable, String titleID[],
			int count) {
		getData(levelListDrawable, titleID, count);
	}

	public void getData(LevelListDrawable levelListDrawable, String titleID[],
			int count) {
		mLevelListDrawable = levelListDrawable;
		mTitleID = titleID;
		mCount = count;

	}

	public String getTitle(int index) {
		return mTitleID[index];
	}

	public Drawable getDrawable(int index) {
		mLevelListDrawable.setLevel(index);
		Drawable drawable = mLevelListDrawable.getCurrent();
		return drawable;
	}

	public int getCount() {
		return mCount;
	}

	// return the clicked item
	public Object getItem(int pos) {
		return (Object) mLevelListDrawable.getCurrent();
	}
}
